package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "service-cart")
public interface CartFeignClient {

    @GetMapping("/api/cart/addToCart/{skuId}/{skuNum}")
    public void addToCart(@PathVariable("skuId") Long skuId,
                              @PathVariable("skuNum") Integer skuNum);

    @GetMapping("/api/cart/toCart/{skuId}")
    public CartInfo toCart(@PathVariable("skuId") Long skuId);

    //商品清单 购物车中选中的商品集合（结算页面查询
    @GetMapping("/api/cart/checkedCartInfoList")
    public List<CartInfo> checkedCartInfoList();


}
